import request from '@utils/request';
import { service } from '@utils/service'

export async function getFunctionList(params:any) {
  return request(`${service.SERVICE_ROOT}/proFun/list`,{
    method: 'POST',
    data: {
      ...params,
    },
  })
}

export async function deleteFunction(params:any) {
  return request(`${service.SERVICE_ROOT}/proFun/delete`,{
    method: 'DELETE',
    data: {
      ...params,
    },
  })
}

export async function addFunction(params:any) {
  return request(`${service.SERVICE_ROOT}/proFun/add`,{
    method: 'POST',
    data: {
      ...params,
    },
  })
}

export async function detailFunction(params:any) {
  return request(`${service.SERVICE_ROOT}/proFun/detail`,{
    method: 'POST',
    data: {
      ...params,
    },
  })
}

export async function updateFunction(params:any) {
  return request(`${service.SERVICE_ROOT}/proFun/update`,{
    method: 'PUT',
    data: {
      ...params,
    },
  })
}
